package o;

import android.graphics.Rect;
import android.util.Log;
import java.lang.reflect.InvocationTargetException;

public class fmx {
    public static Rect ˊ() {
        try {
            Object invoke = Class.forName("com.huawei.android.view.ExtDisplaySizeUtilEx").getMethod("getDisplaySafeInsets", new Class[0]).invoke(null, new Object[0]);
            if (invoke instanceof Rect) {
                return (Rect) invoke;
            }
            Log.e("HwDisplaySizeUtil", "getDisplaySafeInsets: object is not Rect");
            return new Rect();
        } catch (ClassNotFoundException e) {
            Log.w("HwDisplaySizeUtil", "getDisplaySafeInsets: class not found");
            return new Rect();
        } catch (NoSuchMethodException e2) {
            Log.e("HwDisplaySizeUtil", "getDisplaySafeInsets: method not found");
            return new Rect();
        } catch (IllegalAccessException e3) {
            Log.e("HwDisplaySizeUtil", "getDisplaySafeInsets: illegal access exception");
            return new Rect();
        } catch (InvocationTargetException e4) {
            Log.e("HwDisplaySizeUtil", "getDisplaySafeInsets: invocation target exception");
            return new Rect();
        }
    }
}
